$( document ).ready(function(){
    
    //Set Initial Sizing
    $('#layout').height($(window).height() - 35);
    $('#layout').width($(window).width() - 35);
    
    var pstyle = 'background-color: #F5F6F7; border: 1px solid #dfdfdf; padding: 5px;';
    $('#layout').w2layout({
            name: 'layout',
            panels: [
                    { type: 'top', size: 50, resizable: true, style: pstyle, content: 'top' },
                    { type: 'left', size: 200, resizable: true, style: pstyle, content: 'left' },
                    { type: 'main', style: pstyle, content: 'main' }
            ]
    });
    
    w2ui['layout'].load('main', './frame.html');
    
    $(window).resize(function() {
    $('#layout').height($(window).height() - 35);
    $('#layout').width($(window).width() - 35);
    $('#codeframe').height($(window).height() - 120);
    $('#code').height($(window).height() - 120);
    });

    $(window).trigger('resize');
});